import request from "@/utils/request";

export function getCategories(params) {
  return request({
    url: "/category/page",
    method: "get",
    params,
  });
}

export function addCategory(data) {
  return request({
    url: "/category",
    method: "post",
    data,
  });
}

export function updateCategory(data) {
  return request({
    url: "/category",
    method: "put",
    data,
  });
}

export function deleteCategory(data) {
  return request({
    url: "/category",
    method: "delete",
    data,
  });
}